package com.tsj.spzx.exception;

import com.tsj.spzx.model.vo.common.ResultCodeEnum;
import lombok.Data;

@Data
public class TsjException extends RuntimeException{

    // 自定义异常
    private Integer code;
    private String msg;
    private ResultCodeEnum resultCodeEnum;

    public TsjException(ResultCodeEnum resultCodeEnum) {
        this.resultCodeEnum = resultCodeEnum;
        this.code = resultCodeEnum.getCode();
        this.msg = resultCodeEnum.getMessage();
    }

}
